net: emit close on unconnected socket#29803
Closed
ronag wants to merge 2 commits intonodejs:masterfrom
Closed
Conversation
Socket should always emit 'close'. Regardless whether it has been connected or not.
39e179b to
2b81112
Compare
addaleax
approved these changes
Oct 1, 2019
Member
addaleax
left a comment
There was a problem hiding this comment.
Probably a minor fix for an edge case.
I agree.
| process.nextTick(emitCloseNT, this); | ||
| } | ||
|
|
||
| cb(exception); |
Member
There was a problem hiding this comment.
Does this moving this into the individual branches of the if matter, if emitCloseNT is delayed by a tick anyway?
Member
Author
There was a problem hiding this comment.
@addaleax: yes, if the user inside the callback wants to schedule something before 'close' using a nextTick.
Member
Author
There was a problem hiding this comment.
I think I'm very close the edge on the edge case on this one :)
BridgeAR
approved these changes
Oct 1, 2019
trivikr
approved these changes
Oct 2, 2019
JungMinu
approved these changes
Oct 2, 2019
Collaborator
Trott
reviewed
Oct 3, 2019
Collaborator
Trott
pushed a commit
that referenced
this pull request
Oct 3, 2019
Socket should always emit 'close'. Regardless whether it has been connected or not. PR-URL: #29803 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Member
|
Landed in a57da27 |
BridgeAR
pushed a commit
that referenced
this pull request
Oct 9, 2019
Socket should always emit 'close'. Regardless whether it has been connected or not. PR-URL: #29803 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Socket should always emit 'close'. Regardless whether it has been connected or not.
Probably a minor fix for an edge case.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes